home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 May / EnigmA AMIGA RUN 18 (1997)(G.R. Edizioni)(IT)[!][issue 1997-05][EAR-CD II].iso / earcd / dev / misc / progguid.txt < prev    next >
Text File  |  1997-01-23  |  6KB  |  155 lines

  1. programming guidelines, ~hints
  2. by Stefan Kost
  3. email : kost@imn.htwk-leipzig.de
  4. version : 2.0
  5.  
  6. I wrote this, because I sometimes see people doing things which are unneccessary
  7. or could be done better. I don't want to say that my programms (SoundFX,
  8. FractalUniverse,... are perfect. This file is for collecting nice hints & tricks.
  9. So if you have some tricks, remarks, comments,... please let me know.
  10.  
  11. --------------------------------------------------------------------------------
  12.  
  13. Don't Use Assigns !
  14. -------------------
  15.  
  16. Every programm gets automatically an assign called progdir: from system.
  17. Therwith you can acess all file from the assign. Every additional assign
  18. you made has to set everytime the user boots his amiga an slowdown the
  19. boot-process. Furthermore if you use an assignmanager, the user has to
  20. move the assign from user-startup to his assign-manger everytime he is
  21. installing something.
  22.  
  23.  
  24. Keyfiles !
  25. ----------
  26.  
  27. If your sharewareprogramm needs a keyfile, the please don't copy it to L: or S:
  28. or somewhere else. I started with SoundFX and FractalUniverse to make a drawer
  29. keyfiles in devs: and I recomend to place keyfiles there. This makes it possible
  30. to easilly backup your keyfiles.
  31. I've heard that some using a global env-variable called KEYPATH. Maybe check
  32. that too.
  33. But the best way is to show flexibillity, that means to look in several places
  34. (the progdir:, the devs:keyfiles, ...).
  35.  
  36. Prefs !
  37. -------
  38.  
  39. Everytime you boot you amiga, it has to copy all prefs from envarc: to env:.
  40. My suggestion is : Try to read prefs first from Envarc: and then from Env:
  41. If there's no prefs in Env: you already read the one from Envarc:.
  42. If all programms would do that, we don't need to copy them everytime.
  43.  
  44. An easier way is to use 'HappyEnv' which could be found on
  45. Aminet:. This programm solves all these problems descibed above.
  46.  
  47.  
  48. Avoid copying to much to system-directorys !
  49. --------------------------------------------
  50.  
  51. I advice you to create a local directory from progdir: and to copy everything
  52. which is only used by your program there (shared librarys, catalogs, online-help).
  53. Another advantage is with removing the entiere drawer you remove all things
  54. installed by the program.
  55. Maybe you ask the user (expert) during installation where to put it and during
  56. program runtime you check both locations.
  57.  
  58.  
  59. Avoiding too many requesters ! (Helmut Hummel)
  60. ------------------------------
  61.  
  62. Let the user decide which level of security requests he will have. E.g. three
  63. levels for closing a document :
  64.     * ask never
  65.     * ask only if unsaved
  66.     * ask ever
  67.  
  68.  
  69. Default Tool Path (Phil Casidy)
  70. -----------------
  71.  
  72. Installer, Multiview, Amigaguide,.. :
  73. These Programs are installed in SYS:Utilities. So don't assume them somewhere
  74. else ! So the default tool for them should not include any path.
  75.  
  76.  
  77. Uploadarchives for e.g. Aminet
  78. ------------------------------
  79.  
  80. Start the short description of your readme with the version number. Don't
  81. include it in the name, because that would lead to dozen of different versions
  82. present in the same dir.
  83.  
  84. Try to split the archive in subarchives if your programm becomes huge. E.g.
  85. different binarys, languages. This avoids downloading not needed stuff.
  86.  
  87.  
  88. Diskettes and harddisk ! (Kai Andres)
  89. ------------------------
  90.  
  91. When your program comes along on multiple disks, please don't always use
  92. their names to access files. Try to look for that file in "PROGDIR:"
  93. (or current dir) first before attempting to load it from a disk directly.
  94. Doing so, you enable the program to be installed onto harddisk by simply
  95. copying all files to the same directory.
  96.  
  97.  
  98. Minimize all diskaccess ! (Kai Andres)
  99. -------------------------
  100.  
  101. When some files are needed quite often, you better copy them into "RAM:"
  102. and read them from there to speed up loading.
  103.  
  104.  
  105. Don't ICONize everything ! (Kai Andres)
  106. --------------------------
  107.  
  108. Some people create icons for almost all kinds of files, even if they are
  109. just overlays or pure datafiles. I really don't understand that. Icons
  110. should only be used for programs that can be started alone or for projects,
  111. but NOT for things the user might get confused with.
  112. If you want to support "drag & drop" for changing datafiles (keyfiles for
  113. example), try to define their icons as projects that will start your
  114. program when mouseclicked.
  115.  
  116.  
  117. Check versions ! (Kai Andres)
  118. ----------------
  119.  
  120. When your program delivers and installs general libraries to any system-
  121. directory (such as "LIBS:"), don't just overwrite old files. Please check
  122. their versions first to avoid unwanted replacements of newer libraries with
  123. older ones.
  124.  
  125. If you want to find out about Kickstart 2.0 or higher being used, simply
  126. try to open "exec.library", version 36. If this fails, the user still
  127. has Kickstart 1.3 or below in his Amiga (but don't forget to close the lib
  128. again after testing in case it could be opened!).
  129.  
  130.  
  131. -------------------------------------------------------------------------------
  132.  
  133. I got inspiration, comments, ideas from (in alphabetical order) :
  134.  
  135. Andreas Mixich        humpty@tomate.tng.oche.de
  136. Guido Mersmann        geit@studst.fh-muenster.de
  137. Helmut Hummel        hhummel@t-online.de
  138. Kai Andres            Catboy@litter.leine.de
  139. Menno Tjoelker           M.Tjoelker@mpn.cp.philips.com
  140. Matthias Andree        M_Andree@tribal.line.org
  141. Phil Casidy            pcasidy@pcmedia.fr
  142. Tak Tang            tst92@ecs.soton.ac.uk
  143.  
  144. So Thank you.
  145.  
  146. To Matthias Andree (in german) :
  147.     Wenn du manche Ideen nicht magst, kein Problem, das kann man aber auch
  148.     freundlicher (taktvoller) ausdruecken !!!
  149.  
  150. That's all for now.
  151. Please support it, by sending me suggestions.
  152. We need proffesional software to survive !
  153.  
  154. Ciao Stefan
  155.